{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "toc": true
   },
   "source": [
    "<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
    "<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#数据预处理\" data-toc-modified-id=\"数据预处理-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>数据预处理</a></span></li><li><span><a href=\"#特征归一化\" data-toc-modified-id=\"特征归一化-2\"><span class=\"toc-item-num\">2&nbsp;&nbsp;</span>特征归一化</a></span></li><li><span><a href=\"#SVM-的线性kernel-进行训练\" data-toc-modified-id=\"SVM-的线性kernel-进行训练-3\"><span class=\"toc-item-num\">3&nbsp;&nbsp;</span>SVM 的线性kernel 进行训练</a></span></li><li><span><a href=\"#训练集效果\" data-toc-modified-id=\"训练集效果-4\"><span class=\"toc-item-num\">4&nbsp;&nbsp;</span>训练集效果</a></span></li><li><span><a href=\"#测试集效果\" data-toc-modified-id=\"测试集效果-5\"><span class=\"toc-item-num\">5&nbsp;&nbsp;</span>测试集效果</a></span></li></ul></div>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:20:16.705893Z",
     "start_time": "2019-02-03T12:20:16.702552Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd \n",
    "from pandas import DataFrame"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:21:13.983812Z",
     "start_time": "2019-02-03T12:21:13.956466Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>User ID</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Age</th>\n",
       "      <th>EstimatedSalary</th>\n",
       "      <th>Purchased</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>15624510</td>\n",
       "      <td>Male</td>\n",
       "      <td>19</td>\n",
       "      <td>19000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15810944</td>\n",
       "      <td>Male</td>\n",
       "      <td>35</td>\n",
       "      <td>20000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>15668575</td>\n",
       "      <td>Female</td>\n",
       "      <td>26</td>\n",
       "      <td>43000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>15603246</td>\n",
       "      <td>Female</td>\n",
       "      <td>27</td>\n",
       "      <td>57000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>15804002</td>\n",
       "      <td>Male</td>\n",
       "      <td>19</td>\n",
       "      <td>76000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>15728773</td>\n",
       "      <td>Male</td>\n",
       "      <td>27</td>\n",
       "      <td>58000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>15598044</td>\n",
       "      <td>Female</td>\n",
       "      <td>27</td>\n",
       "      <td>84000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>15694829</td>\n",
       "      <td>Female</td>\n",
       "      <td>32</td>\n",
       "      <td>150000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>15600575</td>\n",
       "      <td>Male</td>\n",
       "      <td>25</td>\n",
       "      <td>33000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>15727311</td>\n",
       "      <td>Female</td>\n",
       "      <td>35</td>\n",
       "      <td>65000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>15570769</td>\n",
       "      <td>Female</td>\n",
       "      <td>26</td>\n",
       "      <td>80000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>15606274</td>\n",
       "      <td>Female</td>\n",
       "      <td>26</td>\n",
       "      <td>52000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>15746139</td>\n",
       "      <td>Male</td>\n",
       "      <td>20</td>\n",
       "      <td>86000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>15704987</td>\n",
       "      <td>Male</td>\n",
       "      <td>32</td>\n",
       "      <td>18000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15628972</td>\n",
       "      <td>Male</td>\n",
       "      <td>18</td>\n",
       "      <td>82000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>15697686</td>\n",
       "      <td>Male</td>\n",
       "      <td>29</td>\n",
       "      <td>80000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>15733883</td>\n",
       "      <td>Male</td>\n",
       "      <td>47</td>\n",
       "      <td>25000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>15617482</td>\n",
       "      <td>Male</td>\n",
       "      <td>45</td>\n",
       "      <td>26000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>15704583</td>\n",
       "      <td>Male</td>\n",
       "      <td>46</td>\n",
       "      <td>28000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>15621083</td>\n",
       "      <td>Female</td>\n",
       "      <td>48</td>\n",
       "      <td>29000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>15649487</td>\n",
       "      <td>Male</td>\n",
       "      <td>45</td>\n",
       "      <td>22000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>15736760</td>\n",
       "      <td>Female</td>\n",
       "      <td>47</td>\n",
       "      <td>49000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>15714658</td>\n",
       "      <td>Male</td>\n",
       "      <td>48</td>\n",
       "      <td>41000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>15599081</td>\n",
       "      <td>Female</td>\n",
       "      <td>45</td>\n",
       "      <td>22000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>15705113</td>\n",
       "      <td>Male</td>\n",
       "      <td>46</td>\n",
       "      <td>23000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>15631159</td>\n",
       "      <td>Male</td>\n",
       "      <td>47</td>\n",
       "      <td>20000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>15792818</td>\n",
       "      <td>Male</td>\n",
       "      <td>49</td>\n",
       "      <td>28000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>15633531</td>\n",
       "      <td>Female</td>\n",
       "      <td>47</td>\n",
       "      <td>30000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>15744529</td>\n",
       "      <td>Male</td>\n",
       "      <td>29</td>\n",
       "      <td>43000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>15669656</td>\n",
       "      <td>Male</td>\n",
       "      <td>31</td>\n",
       "      <td>18000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>370</th>\n",
       "      <td>15611430</td>\n",
       "      <td>Female</td>\n",
       "      <td>60</td>\n",
       "      <td>46000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>371</th>\n",
       "      <td>15774744</td>\n",
       "      <td>Male</td>\n",
       "      <td>60</td>\n",
       "      <td>83000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>372</th>\n",
       "      <td>15629885</td>\n",
       "      <td>Female</td>\n",
       "      <td>39</td>\n",
       "      <td>73000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>373</th>\n",
       "      <td>15708791</td>\n",
       "      <td>Male</td>\n",
       "      <td>59</td>\n",
       "      <td>130000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>374</th>\n",
       "      <td>15793890</td>\n",
       "      <td>Female</td>\n",
       "      <td>37</td>\n",
       "      <td>80000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>375</th>\n",
       "      <td>15646091</td>\n",
       "      <td>Female</td>\n",
       "      <td>46</td>\n",
       "      <td>32000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>376</th>\n",
       "      <td>15596984</td>\n",
       "      <td>Female</td>\n",
       "      <td>46</td>\n",
       "      <td>74000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>377</th>\n",
       "      <td>15800215</td>\n",
       "      <td>Female</td>\n",
       "      <td>42</td>\n",
       "      <td>53000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>378</th>\n",
       "      <td>15577806</td>\n",
       "      <td>Male</td>\n",
       "      <td>41</td>\n",
       "      <td>87000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>379</th>\n",
       "      <td>15749381</td>\n",
       "      <td>Female</td>\n",
       "      <td>58</td>\n",
       "      <td>23000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>380</th>\n",
       "      <td>15683758</td>\n",
       "      <td>Male</td>\n",
       "      <td>42</td>\n",
       "      <td>64000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>381</th>\n",
       "      <td>15670615</td>\n",
       "      <td>Male</td>\n",
       "      <td>48</td>\n",
       "      <td>33000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>382</th>\n",
       "      <td>15715622</td>\n",
       "      <td>Female</td>\n",
       "      <td>44</td>\n",
       "      <td>139000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>383</th>\n",
       "      <td>15707634</td>\n",
       "      <td>Male</td>\n",
       "      <td>49</td>\n",
       "      <td>28000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>384</th>\n",
       "      <td>15806901</td>\n",
       "      <td>Female</td>\n",
       "      <td>57</td>\n",
       "      <td>33000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>385</th>\n",
       "      <td>15775335</td>\n",
       "      <td>Male</td>\n",
       "      <td>56</td>\n",
       "      <td>60000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>386</th>\n",
       "      <td>15724150</td>\n",
       "      <td>Female</td>\n",
       "      <td>49</td>\n",
       "      <td>39000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>387</th>\n",
       "      <td>15627220</td>\n",
       "      <td>Male</td>\n",
       "      <td>39</td>\n",
       "      <td>71000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>388</th>\n",
       "      <td>15672330</td>\n",
       "      <td>Male</td>\n",
       "      <td>47</td>\n",
       "      <td>34000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>389</th>\n",
       "      <td>15668521</td>\n",
       "      <td>Female</td>\n",
       "      <td>48</td>\n",
       "      <td>35000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>390</th>\n",
       "      <td>15807837</td>\n",
       "      <td>Male</td>\n",
       "      <td>48</td>\n",
       "      <td>33000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>391</th>\n",
       "      <td>15592570</td>\n",
       "      <td>Male</td>\n",
       "      <td>47</td>\n",
       "      <td>23000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>392</th>\n",
       "      <td>15748589</td>\n",
       "      <td>Female</td>\n",
       "      <td>45</td>\n",
       "      <td>45000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>393</th>\n",
       "      <td>15635893</td>\n",
       "      <td>Male</td>\n",
       "      <td>60</td>\n",
       "      <td>42000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>394</th>\n",
       "      <td>15757632</td>\n",
       "      <td>Female</td>\n",
       "      <td>39</td>\n",
       "      <td>59000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>395</th>\n",
       "      <td>15691863</td>\n",
       "      <td>Female</td>\n",
       "      <td>46</td>\n",
       "      <td>41000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>396</th>\n",
       "      <td>15706071</td>\n",
       "      <td>Male</td>\n",
       "      <td>51</td>\n",
       "      <td>23000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>397</th>\n",
       "      <td>15654296</td>\n",
       "      <td>Female</td>\n",
       "      <td>50</td>\n",
       "      <td>20000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>398</th>\n",
       "      <td>15755018</td>\n",
       "      <td>Male</td>\n",
       "      <td>36</td>\n",
       "      <td>33000</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>399</th>\n",
       "      <td>15594041</td>\n",
       "      <td>Female</td>\n",
       "      <td>49</td>\n",
       "      <td>36000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>400 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      User ID  Gender  Age  EstimatedSalary  Purchased\n",
       "0    15624510    Male   19            19000          0\n",
       "1    15810944    Male   35            20000          0\n",
       "2    15668575  Female   26            43000          0\n",
       "3    15603246  Female   27            57000          0\n",
       "4    15804002    Male   19            76000          0\n",
       "5    15728773    Male   27            58000          0\n",
       "6    15598044  Female   27            84000          0\n",
       "7    15694829  Female   32           150000          1\n",
       "8    15600575    Male   25            33000          0\n",
       "9    15727311  Female   35            65000          0\n",
       "10   15570769  Female   26            80000          0\n",
       "11   15606274  Female   26            52000          0\n",
       "12   15746139    Male   20            86000          0\n",
       "13   15704987    Male   32            18000          0\n",
       "14   15628972    Male   18            82000          0\n",
       "15   15697686    Male   29            80000          0\n",
       "16   15733883    Male   47            25000          1\n",
       "17   15617482    Male   45            26000          1\n",
       "18   15704583    Male   46            28000          1\n",
       "19   15621083  Female   48            29000          1\n",
       "20   15649487    Male   45            22000          1\n",
       "21   15736760  Female   47            49000          1\n",
       "22   15714658    Male   48            41000          1\n",
       "23   15599081  Female   45            22000          1\n",
       "24   15705113    Male   46            23000          1\n",
       "25   15631159    Male   47            20000          1\n",
       "26   15792818    Male   49            28000          1\n",
       "27   15633531  Female   47            30000          1\n",
       "28   15744529    Male   29            43000          0\n",
       "29   15669656    Male   31            18000          0\n",
       "..        ...     ...  ...              ...        ...\n",
       "370  15611430  Female   60            46000          1\n",
       "371  15774744    Male   60            83000          1\n",
       "372  15629885  Female   39            73000          0\n",
       "373  15708791    Male   59           130000          1\n",
       "374  15793890  Female   37            80000          0\n",
       "375  15646091  Female   46            32000          1\n",
       "376  15596984  Female   46            74000          0\n",
       "377  15800215  Female   42            53000          0\n",
       "378  15577806    Male   41            87000          1\n",
       "379  15749381  Female   58            23000          1\n",
       "380  15683758    Male   42            64000          0\n",
       "381  15670615    Male   48            33000          1\n",
       "382  15715622  Female   44           139000          1\n",
       "383  15707634    Male   49            28000          1\n",
       "384  15806901  Female   57            33000          1\n",
       "385  15775335    Male   56            60000          1\n",
       "386  15724150  Female   49            39000          1\n",
       "387  15627220    Male   39            71000          0\n",
       "388  15672330    Male   47            34000          1\n",
       "389  15668521  Female   48            35000          1\n",
       "390  15807837    Male   48            33000          1\n",
       "391  15592570    Male   47            23000          1\n",
       "392  15748589  Female   45            45000          1\n",
       "393  15635893    Male   60            42000          1\n",
       "394  15757632  Female   39            59000          0\n",
       "395  15691863  Female   46            41000          1\n",
       "396  15706071    Male   51            23000          1\n",
       "397  15654296  Female   50            20000          1\n",
       "398  15755018    Male   36            33000          0\n",
       "399  15594041  Female   49            36000          1\n",
       "\n",
       "[400 rows x 5 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset = pd.read_csv('Social_Network_Ads.csv')\n",
    "dataset = DataFrame(dataset)\n",
    "dataset\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:22:08.675600Z",
     "start_time": "2019-02-03T12:22:08.661443Z"
    }
   },
   "outputs": [],
   "source": [
    "X = dataset.iloc[:, [2, 3]].values\n",
    "y = dataset.iloc[:, 4].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:26:17.427782Z",
     "start_time": "2019-02-03T12:26:17.374326Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "# from sklearn.cross_validation import train_test_split 将不再使用\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 特征归一化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:26:42.010550Z",
     "start_time": "2019-02-03T12:26:42.001230Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/liuchuang/anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py:475: DataConversionWarning: Data with input dtype int64 was converted to float64 by StandardScaler.\n",
      "  warnings.warn(msg, DataConversionWarning)\n"
     ]
    }
   ],
   "source": [
    "from sklearn.preprocessing import StandardScaler\n",
    "sc = StandardScaler()\n",
    "X_train = sc.fit_transform(X_train)\n",
    "X_test = sc.fit_transform(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  SVM 的线性kernel 进行训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:33:08.876356Z",
     "start_time": "2019-02-03T12:33:08.867350Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC(C=2, cache_size=200, class_weight=None, coef0=0.0,\n",
       "  decision_function_shape='ovr', degree=3, gamma='auto', kernel='linear',\n",
       "  max_iter=-1, probability=False, random_state=0, shrinking=True,\n",
       "  tol=0.001, verbose=False)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "classifier = SVC(kernel = 'linear', random_state = 0, C = 2)\n",
    "classifier.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:33:09.704668Z",
     "start_time": "2019-02-03T12:33:09.701349Z"
    }
   },
   "outputs": [],
   "source": [
    "y_pred = classifier.predict(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 训练集效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:33:11.415696Z",
     "start_time": "2019-02-03T12:33:10.853860Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEWCAYAAABmE+CbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJztv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AEwQDMMwjDwmCIbhk3wKrYrIuWnbYhhxYIJgGP65DtiOU4xmGDMOEwTD8EG+B84lwJ+SFwQRyYjI/833oP+uiNwtIm/Ov/dSEekXkV+IyA9FZFmK5huGL0wQDMMffwD8QFX3AE+JyO/hrPOwCjgfeCdONXahZ86ngTer6kuBfwN60zDaMIJgze0Mwx/XAZ/K/3xn/vUc4EjsczEAAADrSURBVOuqmgOGRWRb/v1O4DycViQATcCBZM01jOCYIBjGNIhIC3AZcJ6IKM4Ar8C3vA4BHlHVdQmZaBiRYC4jw5ieNwP/rqorVXWVqq4AHgcOAdfkYwmtQE9+/93AGSJyyoUkIi9Ow3DDCIIJgmFMz3VUzgbuApbjrI/wa+DzOCtwjeWX1nwz8I8i8itgB3BxcuYaRm1Yt1PDCIGILFTVI3m30s+AS1R1OG27DKMWLIZgGOH4bn5xkrnA/zIxMBoZmyEYhmEYgMUQDMMwjDwmCIZhGAZggmAYhmHkMUEwDMMwABMEwzAMI8//Dx1G7yoZEAqpAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib.colors import ListedColormap\n",
    "X_set, y_set = X_train, y_train\n",
    "X1, X2 = np.meshgrid(np.arange(start = X_set[:, 0].min() - 1, stop = X_set[:, 0].max() + 1, step = 0.01),\n",
    "                     np.arange(start = X_set[:, 1].min() - 1, stop = X_set[:, 1].max() + 1, step = 0.01))\n",
    "plt.contourf(X1, X2, classifier.predict(np.array([X1.ravel(), X2.ravel()]).T).reshape(X1.shape),\n",
    "             alpha = 0.75, cmap = ListedColormap(('red', 'green')))\n",
    "plt.xlim(X1.min(), X1.max())\n",
    "plt.ylim(X2.min(), X2.max())\n",
    "for i, j in enumerate(np.unique(y_set)):\n",
    "    plt.scatter(X_set[y_set == j, 0], X_set[y_set == j, 1],\n",
    "                c = ListedColormap(('red', 'green'))(i), label = j)\n",
    "plt.title('SVM (Training set)')\n",
    "plt.xlabel('Age')\n",
    "plt.ylabel('Estimated Salary')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 测试集效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-02-03T12:33:13.381596Z",
     "start_time": "2019-02-03T12:33:12.828333Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEWCAYAAABmE+CbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X+cXHV97/HXZ39kgyYCTZNN+BHi3koEEZcaLcH17hrQBisqYm+h1Joqjdp6VdTbqlxstU17ba2WqvehkSpaKVwlovLDIk2TFSSiQSOFR9iISxJSkg2uSUiAbJKdz/3jzCS7mzMzZ3bOmXNmzvv5eMxjd87MnPlOfpz3fH+buyMiItKWdgFERCQbFAgiIgIoEEREpEiBICIigAJBRESKFAgiIgIoEETKMrObzOyNaZcjDmZ2mpk9ZGadaZdFskuBIJlmZn1mdp+Z7TOzX5nZD8zsZWa21MyeNrPZIa/5qZm928wWmZmb2U+mPP7rZnbIzLZWeN9zgZcA3zazj5jZgeLtoJmNT7j/cB2fbbmZPTrd11c59y4z6yvdd/cdwI+AFUm8n7QGBYJklpk9D7gd+Azwa8CpwMeAMXffAOwALpvymnOAs4GbJhx+bvF4ye8Dj1V5+3cAN3rgb9x9lrvPAt4JbCjdd/cX1fERG+1Ggs8lEkqBIFl2JoC73+Tu4+7+rLt/z90fLD7+FeAPp7zmD4E73H10wrF/Ad465TlfrfLeFwODUQtqZueY2X+Y2R4z2zyxqcnM3mBmj5jZfjN73MzeY2ZzgFuBngm1jTkh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M5x99j7hhQIFbj7RZUeN7O3Aq8DLvQmndBR7TO2qB3A6RPunwY8kVJZpE5m1kkQBje6+zfTLk+S3H2vma0n6BuKPRDUZDRNZrYc+HPg9e7+TNrlkZr8GHiBmT3fzGYAlwPfSblMMg1mZsA/A5vd/VNplycJZja3NIrRzE4ALgIeSeK9FAjT91lgNnC3mW0ys8+nXaC4mdmlZrYDWArcYWZ3pV2mOBQHA7wbuIugE/Lr7v5wuqWKn5ndBGwAFpvZDjN7e9plSsArgLcAy4r/DzeZ2WvTLlTMFgDrzOxBgi8zd7v77Um8kZauEBERQDUEEREpUiCIiAigQBARkSIFgoiIAAoEEREpUiCIRFQchutm9sK0yyKSBAWCSHRXAPcSTGQTaTkKBJEIimvlvAJ4O8VAMLM2M/u/xTXqbzezO83szcXHXmpmg2b2gJndZWYLUiy+SCQKBJFo3gj8m7tvAX5lZr9JsFfEIuDFwFUEM7pLa+t8Bnizu78U+BKwKo1Ci9RCi9uJRHMF8I/F328u3u8EvuHuBWCXma0rPr4YOIdgWROAdmBnY4srUjsFgkgVZjYHWAacY2ZOcIF34NZyLwEedvelDSqiSCzUZCRS3ZuBr7r7Ge6+yN1PBx4DfglcVuxL6AYGis8fAuaa2dEmJDN7URoFF6mFAkGkuis4vjawBjiFYG+Fh4AvEOzUta+4LeebgU+Y2c+ATcAFjSuuyPRotVOROpjZLHc/UGxW+hHwCnfflXa5RKZDfQgi9bm9uHnJDOCvFAbSzFRDEBERQH0IIiJSpEAQERFAgSAiIkUKBBERARQIIiJS9P8Bl/kFx4gmzUIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib.colors import ListedColormap\n",
    "X_set, y_set = X_test, y_test\n",
    "X1, X2 = np.meshgrid(np.arange(start = X_set[:, 0].min() - 1, stop = X_set[:, 0].max() + 1, step = 0.01),\n",
    "                     np.arange(start = X_set[:, 1].min() - 1, stop = X_set[:, 1].max() + 1, step = 0.01))\n",
    "plt.contourf(X1, X2, classifier.predict(np.array([X1.ravel(), X2.ravel()]).T).reshape(X1.shape),\n",
    "             alpha = 0.75, cmap = ListedColormap(('red', 'green')))\n",
    "plt.xlim(X1.min(), X1.max())\n",
    "plt.ylim(X2.min(), X2.max())\n",
    "for i, j in enumerate(np.unique(y_set)):\n",
    "    plt.scatter(X_set[y_set == j, 0], X_set[y_set == j, 1],\n",
    "                c = ListedColormap(('red', 'green'))(i), label = j)\n",
    "plt.title('SVM (Test set)')\n",
    "plt.xlabel('Age')\n",
    "plt.ylabel('Estimated Salary')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": true,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
